﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;

namespace Biz.Core.Models
{
    public class OrderVo
    {
        public string OrderId { get; set; }

        public string Buyer { get; set; }

        public string Seller { get; set; }

        public decimal TotalAmt { get; set; }

        public decimal TradeAmt { get; set; }

        public bool Paid { get; set; }

        public string PayMode { get; set; }

        public List<OrderItemVo> Items { get; set; }
    }

    public class OrderItemVo
    {
        public int Ordinal { get; set; }

        public string GoodsName { get; set; }

        public string Unit { get; set; }

        public int Quantity { get; set; }

        public decimal UnitPrice { get; set; }

        public decimal TradeAmt { get { return this.Quantity * this.UnitPrice; } }

        public float TaxRate { get; set; }

        public decimal TaxFee { get{ return (decimal)this.TaxRate * this.TradeAmt; } }
    }
}
